home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / SDKRPC.PAK / OAIDL.IDL < prev    next >
Text File  |  1997-05-06  |  53KB  |  1,765 lines

  1. //+---------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1992 - 1996.
  5. //
  6. //  File: oaidl.idl
  7. //
  8. //----------------------------------------------------------------------------
  9.  
  10. cpp_quote("//+-------------------------------------------------------------------------")
  11. cpp_quote("//")
  12. cpp_quote("//  Microsoft Windows")
  13. cpp_quote("//  Copyright (C) Microsoft Corporation, 1992 - 1996.")
  14. cpp_quote("//")
  15. cpp_quote("//--------------------------------------------------------------------------")
  16.  
  17. #ifndef DO_NO_IMPORTS
  18. import "objidl.idl";
  19. #endif
  20.  
  21. interface ICreateTypeInfo;
  22. interface ICreateTypeInfo2;
  23. interface ICreateTypeLib;
  24. interface ICreateTypeLib2;
  25. interface IDispatch;
  26. interface IEnumVARIANT;
  27. interface ITypeComp;
  28. interface ITypeInfo;
  29. interface ITypeInfo2;
  30. interface ITypeLib;
  31. interface ITypeLib2;
  32. interface ITypeChangeEvents;
  33. interface IErrorInfo;
  34. interface ICreateErrorInfo;
  35. interface ISupportErrorInfo;
  36.  
  37.  
  38. [
  39.   version(1.0), pointer_default(unique)
  40. ]
  41.  
  42. interface IOleAutomationTypes
  43. {
  44.  
  45. typedef CY CURRENCY;
  46.  
  47. // #########################################################################
  48. //      SAFEARRAY
  49. // #########################################################################
  50.  
  51. typedef struct tagSAFEARRAYBOUND {
  52.     ULONG cElements;
  53.     LONG  lLbound;
  54. } SAFEARRAYBOUND, * LPSAFEARRAYBOUND;
  55.  
  56. cpp_quote("#if defined(_OLEAUT32_)")
  57. cpp_quote("/* the following is what MIDL knows how to remote */")
  58.  
  59. // Forward references.
  60. typedef [unique] struct _wireVARIANT * wireVARIANT;
  61.  
  62. typedef struct _wireSAFEARR_BSTR {
  63.     ULONG Size;
  64.     [size_is(Size), ref] wireBSTR * aBstr;
  65. } SAFEARR_BSTR;
  66.  
  67. typedef struct _wireSAFEARR_UNKNOWN {
  68.     ULONG Size;
  69.     [size_is(Size), ref] IUnknown ** apUnknown;
  70. } SAFEARR_UNKNOWN;
  71.  
  72. typedef struct _wireSAFEARR_DISPATCH {
  73.     ULONG Size;
  74.     [size_is(Size), ref] IDispatch ** apDispatch;
  75. } SAFEARR_DISPATCH;
  76.  
  77. typedef struct _wireSAFEARR_VARIANT {
  78.     ULONG Size;
  79.     [size_is(Size), ref] wireVARIANT * aVariant;
  80. } SAFEARR_VARIANT;
  81.  
  82. typedef [v1_enum] enum tagSF_TYPE {
  83.     SF_ERROR    = VT_ERROR,
  84.     SF_I1       = VT_I1,
  85.     SF_I2       = VT_I2,
  86.     SF_I4       = VT_I4,
  87.     SF_I8       = VT_I8,
  88.     SF_BSTR     = VT_BSTR,
  89.     SF_UNKNOWN  = VT_UNKNOWN,
  90.     SF_DISPATCH = VT_DISPATCH,
  91.     SF_VARIANT  = VT_VARIANT
  92. } SF_TYPE;
  93.  
  94. typedef union _wireSAFEARRAY_UNION switch(ULONG sfType) u {
  95.     case SF_BSTR:      SAFEARR_BSTR     BstrStr;
  96.     case SF_UNKNOWN:   SAFEARR_UNKNOWN  UnknownStr;
  97.     case SF_DISPATCH:  SAFEARR_DISPATCH DispatchStr;
  98.     case SF_VARIANT:   SAFEARR_VARIANT  VariantStr;
  99.     case SF_I1:        BYTE_SIZEDARR    ByteStr;
  100.     case SF_I2:        WORD_SIZEDARR    WordStr;
  101.     case SF_I4:        DWORD_SIZEDARR   LongStr;
  102.     case SF_I8:        HYPER_SIZEDARR   HyperStr;
  103.     default:           ;                // error
  104. } SAFEARRAYUNION;
  105.  
  106. typedef [unique] struct _wireSAFEARRAY {
  107.     USHORT cDims;
  108.     USHORT fFeatures;
  109.     ULONG  cbElements;
  110.     ULONG  cLocks;
  111.     SAFEARRAYUNION uArrayStructs;
  112.     [size_is(cDims)] SAFEARRAYBOUND rgsabound[];
  113. } * wireSAFEARRAY;
  114.  
  115. typedef [unique] wireSAFEARRAY * wirePSAFEARRAY;
  116.  
  117. cpp_quote("#endif /* _OLEAUT32_ */")
  118.  
  119. typedef struct tagSAFEARRAY {
  120.     USHORT cDims;
  121.     USHORT fFeatures;
  122.     ULONG  cbElements;
  123.     ULONG  cLocks;
  124.     PVOID  pvData;
  125.     SAFEARRAYBOUND rgsabound[];
  126. } SAFEARRAY;
  127.  
  128. typedef [wire_marshal(wirePSAFEARRAY)] SAFEARRAY * LPSAFEARRAY;
  129.  
  130. const USHORT FADF_AUTO       = 0x0001;  /* array is allocated on the stack */
  131. const USHORT FADF_STATIC     = 0x0002;  /* array is staticly allocated */
  132. const USHORT FADF_EMBEDDED   = 0x0004;  /* array is embedded in a structure */
  133. const USHORT FADF_FIXEDSIZE  = 0x0010;  /* may not be resized or reallocated */
  134. const USHORT FADF_BSTR       = 0x0100;  /* an array of BSTRs */
  135. const USHORT FADF_UNKNOWN    = 0x0200;  /* an array of IUnknown* */
  136. const USHORT FADF_DISPATCH   = 0x0400;  /* an array of IDispatch* */
  137. const USHORT FADF_VARIANT    = 0x0800;  /* an array of VARIANTs */
  138. const USHORT FADF_RESERVED   = 0xF0E8;  /* reserved bits */
  139.  
  140.  
  141. // #########################################################################
  142. //      VARIANT
  143. // #########################################################################
  144.  
  145. cpp_quote("/* VARIANT STRUCTURE")
  146. cpp_quote(" *")
  147. cpp_quote(" *  VARTYPE vt;")
  148. cpp_quote(" *  WORD wReserved1;")
  149. cpp_quote(" *  WORD wReserved2;")
  150. cpp_quote(" *  WORD wReserved3;")
  151. cpp_quote(" *  union {")
  152. cpp_quote(" *    LONG           VT_I4")
  153. cpp_quote(" *    BYTE           VT_UI1")
  154. cpp_quote(" *    SHORT          VT_I2")
  155. cpp_quote(" *    FLOAT          VT_R4")
  156. cpp_quote(" *    DOUBLE         VT_R8")
  157. cpp_quote(" *    VARIANT_BOOL   VT_BOOL")
  158. cpp_quote(" *    SCODE          VT_ERROR")
  159. cpp_quote(" *    CY             VT_CY")
  160. cpp_quote(" *    DATE           VT_DATE")
  161. cpp_quote(" *    BSTR           VT_BSTR")
  162. cpp_quote(" *    IUnknown *     VT_UNKNOWN")
  163. cpp_quote(" *    IDispatch *    VT_DISPATCH")
  164. cpp_quote(" *    SAFEARRAY *    VT_ARRAY")
  165. cpp_quote(" *    BYTE *         VT_BYREF|VT_UI1")
  166. cpp_quote(" *    SHORT *        VT_BYREF|VT_I2")
  167. cpp_quote(" *    LONG *         VT_BYREF|VT_I4")
  168. cpp_quote(" *    FLOAT *        VT_BYREF|VT_R4")
  169. cpp_quote(" *    DOUBLE *       VT_BYREF|VT_R8")
  170. cpp_quote(" *    VARIANT_BOOL * VT_BYREF|VT_BOOL")
  171. cpp_quote(" *    SCODE *        VT_BYREF|VT_ERROR")
  172. cpp_quote(" *    CY *           VT_BYREF|VT_CY")
  173. cpp_quote(" *    DATE *         VT_BYREF|VT_DATE")
  174. cpp_quote(" *    BSTR *         VT_BYREF|VT_BSTR")
  175. cpp_quote(" *    IUnknown **    VT_BYREF|VT_UNKNOWN")
  176. cpp_quote(" *    IDispatch **   VT_BYREF|VT_DISPATCH")
  177. cpp_quote(" *    SAFEARRAY **   VT_BYREF|VT_ARRAY")
  178. cpp_quote(" *    VARIANT *      VT_BYREF|VT_VARIANT")
  179. cpp_quote(" *    PVOID          VT_BYREF (Generic ByRef)")
  180. cpp_quote(" *    CHAR           VT_I1")
  181. cpp_quote(" *    USHORT         VT_UI2")
  182. cpp_quote(" *    ULONG          VT_UI4")
  183. cpp_quote(" *    INT            VT_INT")
  184. cpp_quote(" *    UINT           VT_UINT")
  185. cpp_quote(" *    DECIMAL *      VT_BYREF|VT_DECIMAL")
  186. cpp_quote(" *    CHAR *         VT_BYREF|VT_I1")
  187. cpp_quote(" *    USHORT *       VT_BYREF|VT_UI2")
  188. cpp_quote(" *    ULONG *        VT_BYREF|VT_UI4")
  189. cpp_quote(" *    INT *          VT_BYREF|VT_INT")
  190. cpp_quote(" *    UINT *         VT_BYREF|VT_UINT")
  191. cpp_quote(" *  }")
  192. cpp_quote(" */")
  193.  
  194. cpp_quote("#if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION)")
  195. cpp_quote("#define __VARIANT_NAME_1 n1")
  196. cpp_quote("#define __VARIANT_NAME_2 n2")
  197. cpp_quote("#define __VARIANT_NAME_3 n3")
  198. cpp_quote("#else")
  199. cpp_quote("#define __tagVARIANT")
  200. cpp_quote("#define __VARIANT_NAME_1")
  201. cpp_quote("#define __VARIANT_NAME_2")
  202. cpp_quote("#define __VARIANT_NAME_3")
  203. cpp_quote("#endif")
  204.  
  205. typedef [wire_marshal(wireVARIANT)] struct tagVARIANT VARIANT;
  206.  
  207. struct tagVARIANT {
  208.     union {
  209.         struct __tagVARIANT {
  210.             VARTYPE vt;
  211.             WORD    wReserved1;
  212.             WORD    wReserved2;
  213.             WORD    wReserved3;
  214.             union {
  215.                 LONG          lVal;         /* VT_I4                */
  216.                 BYTE          bVal;         /* VT_UI1               */
  217.                 SHORT         iVal;         /* VT_I2                */
  218.                 FLOAT         fltVal;       /* VT_R4                */
  219.                 DOUBLE        dblVal;       /* VT_R8                */
  220.                 VARIANT_BOOL  boolVal;      /* VT_BOOL              */
  221.                 _VARIANT_BOOL bool;         /* (obsolete)           */
  222.                 SCODE         scode;        /* VT_ERROR             */
  223.                 CY            cyVal;        /* VT_CY                */
  224.                 DATE          date;         /* VT_DATE              */
  225.                 BSTR          bstrVal;      /* VT_BSTR              */
  226.                 IUnknown *    punkVal;      /* VT_UNKNOWN           */
  227.                 IDispatch *   pdispVal;     /* VT_DISPATCH          */
  228.                 SAFEARRAY *   parray;       /* VT_ARRAY             */
  229.                 BYTE *        pbVal;        /* VT_BYREF|VT_UI1      */
  230.                 SHORT *       piVal;        /* VT_BYREF|VT_I2       */
  231.                 LONG *        plVal;        /* VT_BYREF|VT_I4       */
  232.                 FLOAT *       pfltVal;      /* VT_BYREF|VT_R4       */
  233.                 DOUBLE *      pdblVal;      /* VT_BYREF|VT_R8       */
  234.                 VARIANT_BOOL *pboolVal;     /* VT_BYREF|VT_BOOL     */
  235.                 _VARIANT_BOOL *pbool;       /* (obsolete)           */
  236.                 SCODE *       pscode;       /* VT_BYREF|VT_ERROR    */
  237.                 CY *          pcyVal;       /* VT_BYREF|VT_CY       */
  238.                 DATE *        pdate;        /* VT_BYREF|VT_DATE     */
  239.                 BSTR *        pbstrVal;     /* VT_BYREF|VT_BSTR     */
  240.                 IUnknown **   ppunkVal;     /* VT_BYREF|VT_UNKNOWN  */
  241.                 IDispatch **  ppdispVal;    /* VT_BYREF|VT_DISPATCH */
  242.                 SAFEARRAY **  pparray;      /* VT_BYREF|VT_ARRAY    */
  243.                 VARIANT *     pvarVal;      /* VT_BYREF|VT_VARIANT  */
  244.                 PVOID         byref;        /* Generic ByRef        */
  245.                 CHAR          cVal;         /* VT_I1                */
  246.                 USHORT        uiVal;        /* VT_UI2               */
  247.                 ULONG         ulVal;        /* VT_UI4               */
  248.                 INT           intVal;       /* VT_INT               */
  249.                 UINT          uintVal;      /* VT_UINT              */
  250.                 DECIMAL *     pdecVal;      /* VT_BYREF|VT_DECIMAL  */
  251.                 CHAR *        pcVal;        /* VT_BYREF|VT_I1       */
  252.                 USHORT *      puiVal;       /* VT_BYREF|VT_UI2      */
  253.                 ULONG *       pulVal;       /* VT_BYREF|VT_UI4      */
  254.                 INT *         pintVal;      /* VT_BYREF|VT_INT      */
  255.                 UINT *        puintVal;     /* VT_BYREF|VT_UINT     */
  256.             } __VARIANT_NAME_3;
  257.         } __VARIANT_NAME_2;
  258.  
  259.         DECIMAL decVal;
  260.     } __VARIANT_NAME_1;
  261. };
  262.  
  263. typedef VARIANT * LPVARIANT;
  264. typedef VARIANT VARIANTARG;
  265. typedef VARIANT * LPVARIANTARG;
  266.  
  267. cpp_quote("#if defined(_OLEAUT32_)")
  268. cpp_quote("/* the following is what MIDL knows how to remote */")
  269.  
  270. struct _wireVARIANT {
  271.     DWORD  clSize;          /* wire buffer length in units of hyper (int64) */
  272.     DWORD  rpcReserved;     /* for future use */
  273.     USHORT vt;
  274.     USHORT wReserved1;
  275.     USHORT wReserved2;
  276.     USHORT wReserved3;
  277.     [switch_type(USHORT), switch_is(vt)] union {
  278.     [case(VT_I4)]       LONG          lVal;         /* VT_I4                */
  279.     [case(VT_UI1)]      BYTE          bVal;         /* VT_UI1               */
  280.     [case(VT_I2)]       SHORT         iVal;         /* VT_I2                */
  281.     [case(VT_R4)]       FLOAT         fltVal;       /* VT_R4                */
  282.     [case(VT_R8)]       DOUBLE        dblVal;       /* VT_R8                */
  283.     [case(VT_BOOL)]     VARIANT_BOOL  boolVal;      /* VT_BOOL              */
  284.     [case(VT_ERROR)]    SCODE         scode;        /* VT_ERROR             */
  285.     [case(VT_CY)]       CY            cyVal;        /* VT_CY                */
  286.     [case(VT_DATE)]     DATE          date;         /* VT_DATE              */
  287.     [case(VT_BSTR)]     wireBSTR      bstrVal;      /* VT_BSTR              */
  288.     [case(VT_UNKNOWN)]  IUnknown *    punkVal;      /* VT_UNKNOWN           */
  289.     [case(VT_DISPATCH)] IDispatch *   pdispVal;     /* VT_DISPATCH          */
  290.     [case(VT_ARRAY)]    wireSAFEARRAY parray;       /* VT_ARRAY             */
  291.  
  292.     [case(VT_UI1|VT_BYREF)]
  293.                         BYTE *        pbVal;        /* VT_BYREF|VT_UI1      */
  294.     [case(VT_I2|VT_BYREF)]
  295.                         SHORT *       piVal;        /* VT_BYREF|VT_I2       */
  296.     [case(VT_I4|VT_BYREF)]
  297.                         LONG *        plVal;        /* VT_BYREF|VT_I4       */
  298.     [case(VT_R4|VT_BYREF)]
  299.                         FLOAT *       pfltVal;      /* VT_BYREF|VT_R4       */
  300.     [case(VT_R8|VT_BYREF)]
  301.                         DOUBLE *      pdblVal;      /* VT_BYREF|VT_R8       */
  302.     [case(VT_BOOL|VT_BYREF)]
  303.                         VARIANT_BOOL *pboolVal;     /* VT_BYREF|VT_BOOL     */
  304.     [case(VT_ERROR|VT_BYREF)]
  305.                         SCODE *       pscode;       /* VT_BYREF|VT_ERROR    */
  306.     [case(VT_CY|VT_BYREF)]
  307.                         CY *          pcyVal;       /* VT_BYREF|VT_CY       */
  308.     [case(VT_DATE|VT_BYREF)]
  309.                         DATE *        pdate;        /* VT_BYREF|VT_DATE     */
  310.     [case(VT_BSTR|VT_BYREF)]
  311.                         wireBSTR *    pbstrVal;     /* VT_BYREF|VT_BSTR     */
  312.     [case(VT_UNKNOWN|VT_BYREF)]
  313.                         IUnknown **   ppunkVal;     /* VT_BYREF|VT_UNKNOWN  */
  314.     [case(VT_DISPATCH|VT_BYREF)]
  315.                         IDispatch **  ppdispVal;    /* VT_BYREF|VT_DISPATCH */
  316.     [case(VT_ARRAY|VT_BYREF)]
  317.                         wireSAFEARRAY *pparray;     /* VT_BYREF|VT_ARRAY    */
  318.     [case(VT_VARIANT|VT_BYREF)]
  319.                         wireVARIANT * pvarVal;      /* VT_BYREF|VT_VARIANT  */
  320.  
  321.     [case(VT_I1)]       CHAR          cVal;         /* VT_I1                */
  322.     [case(VT_UI2)]      USHORT        uiVal;        /* VT_UI2               */
  323.     [case(VT_UI4)]      ULONG         ulVal;        /* VT_UI4               */
  324.     [case(VT_INT)]      INT           intVal;       /* VT_INT               */
  325.     [case(VT_UINT)]     UINT          uintVal;      /* VT_UINT              */
  326.     [case(VT_DECIMAL)]  DECIMAL       decVal;       /* VT_DECIMAL           */
  327.  
  328.     [case(VT_BYREF|VT_DECIMAL)]
  329.                         DECIMAL *     pdecVal;      /* VT_BYREF|VT_DECIMAL  */
  330.     [case(VT_BYREF|VT_I1)]
  331.                         CHAR *        pcVal;        /* VT_BYREF|VT_I1       */
  332.     [case(VT_BYREF|VT_UI2)]
  333.                         USHORT *      puiVal;       /* VT_BYREF|VT_UI2      */
  334.     [case(VT_BYREF|VT_UI4)]
  335.                         ULONG *       pulVal;       /* VT_BYREF|VT_UI4      */
  336.     [case(VT_BYREF|VT_INT)]
  337.                         INT *         pintVal;      /* VT_BYREF|VT_INT      */
  338.     [case(VT_BYREF|VT_UINT)]
  339.                         UINT *        puintVal;     /* VT_BYREF|VT_UINT     */
  340.  
  341.     [case(VT_EMPTY)]    ;                           /* nothing              */
  342.     [case(VT_NULL)]     ;                           /* nothing              */
  343.     };
  344. };
  345.  
  346. cpp_quote("#endif /* _OLEAUT32_ */")
  347.  
  348. //########################################################################
  349. //     End of VARIANT & SAFEARRAY
  350. //########################################################################
  351.  
  352.  
  353. //TypeInfo stuff.
  354.  
  355. typedef LONG DISPID;
  356. typedef DISPID MEMBERID;
  357. typedef DWORD HREFTYPE;
  358.  
  359. typedef [v1_enum] enum tagTYPEKIND {
  360.     TKIND_ENUM = 0,
  361.     TKIND_RECORD,
  362.     TKIND_MODULE,
  363.     TKIND_INTERFACE,
  364.     TKIND_DISPATCH,
  365.     TKIND_COCLASS,
  366.     TKIND_ALIAS,
  367.     TKIND_UNION,
  368.     TKIND_MAX                   /* end of enum marker */
  369. } TYPEKIND;
  370.  
  371. typedef struct tagTYPEDESC {
  372.     [switch_type(VARTYPE), switch_is(vt)] union {
  373.         [case(VT_PTR, VT_SAFEARRAY)] struct tagTYPEDESC * lptdesc;
  374.         [case(VT_CARRAY)] struct tagARRAYDESC * lpadesc;
  375.         [case(VT_USERDEFINED)] HREFTYPE hreftype;
  376.         [default] ;
  377.     };
  378.     VARTYPE vt;
  379. } TYPEDESC;
  380.  
  381. typedef struct tagARRAYDESC {
  382.     TYPEDESC tdescElem;         /* element type */
  383.     USHORT cDims;               /* dimension count */
  384.     [size_is(cDims)] SAFEARRAYBOUND rgbounds[]; /* var len array of bounds */
  385. } ARRAYDESC;
  386.  
  387. // parameter description
  388.  
  389. typedef struct tagPARAMDESCEX {
  390.     ULONG cBytes;               /* size of this structure */
  391.     VARIANTARG varDefaultValue; /* default value of this parameter */
  392. } PARAMDESCEX, * LPPARAMDESCEX;
  393.  
  394. typedef struct tagPARAMDESC {
  395.     LPPARAMDESCEX pparamdescex; /* valid if PARAMFLAG_FHASDEFAULT bit is set */
  396.     USHORT wParamFlags;         /* IN, OUT, etc */
  397. } PARAMDESC, * LPPARAMDESC;
  398.  
  399. const USHORT PARAMFLAG_NONE         = 0x00;
  400. const USHORT PARAMFLAG_FIN          = 0x01;
  401. const USHORT PARAMFLAG_FOUT         = 0x02;
  402. const USHORT PARAMFLAG_FLCID        = 0x04;
  403. const USHORT PARAMFLAG_FRETVAL      = 0x08;
  404. const USHORT PARAMFLAG_FOPT         = 0x10;
  405. const USHORT PARAMFLAG_FHASDEFAULT  = 0x20;
  406.  
  407. typedef struct tagIDLDESC {
  408.     ULONG dwReserved;
  409.     USHORT wIDLFlags;           /* IN, OUT, etc */
  410. } IDLDESC, * LPIDLDESC;
  411.  
  412. const USHORT IDLFLAG_NONE    = PARAMFLAG_NONE;
  413. const USHORT IDLFLAG_FIN     = PARAMFLAG_FIN;
  414. const USHORT IDLFLAG_FOUT    = PARAMFLAG_FOUT;
  415. const USHORT IDLFLAG_FLCID   = PARAMFLAG_FLCID;
  416. const USHORT IDLFLAG_FRETVAL = PARAMFLAG_FRETVAL;
  417.  
  418. cpp_quote("#if 0")
  419. cpp_quote("/* the following is what MIDL knows how to remote */")
  420.  
  421. typedef struct tagELEMDESC {    /* a format that MIDL likes */
  422.     TYPEDESC tdesc;             /* the type of the element */
  423.     PARAMDESC paramdesc;        /* IDLDESC is a subset of PARAMDESC */
  424. } ELEMDESC;
  425.  
  426. cpp_quote("#else /* 0 */")
  427. cpp_quote("typedef struct tagELEMDESC {")
  428. cpp_quote("    TYPEDESC tdesc;             /* the type of the element */")
  429. cpp_quote("    union {")
  430. cpp_quote("        IDLDESC idldesc;        /* info for remoting the element */")
  431. cpp_quote("        PARAMDESC paramdesc;    /* info about the parameter */")
  432. cpp_quote("    };")
  433. cpp_quote("} ELEMDESC, * LPELEMDESC;")
  434. cpp_quote("#endif /* 0 */")
  435.  
  436. typedef struct tagTYPEATTR {
  437.     GUID guid;                  /* the GUID of the TypeInfo */
  438.     LCID lcid;                  /* locale of member names and doc strings */
  439.     DWORD dwReserved;
  440.     MEMBERID memidConstructor;  /* ID of constructor, MEMBERID_NIL if none */
  441.     MEMBERID memidDestructor;   /* ID of destructor, MEMBERID_NIL if none */
  442.     LPOLESTR lpstrSchema;
  443.     ULONG cbSizeInstance;       /* the size of an instance of this type */
  444.     TYPEKIND typekind;          /* the kind of type this typeinfo describes */
  445.     WORD cFuncs;                /* number of functions */
  446.     WORD cVars;                 /* number of variables / data members */
  447.     WORD cImplTypes;            /* number of implemented interfaces */
  448.     WORD cbSizeVft;             /* the size of this types virtual func table */
  449.     WORD cbAlignment;           /* specifies the alignment requirements for
  450.                                    an instance of this type,
  451.                                    0 = align on 64k boundary
  452.                                    1 = byte align
  453.                                    2 = word align
  454.                                    4 = dword align... */
  455.     WORD wTypeFlags;
  456.     WORD wMajorVerNum;          /* major version number */
  457.     WORD wMinorVerNum;          /* minor version number */
  458.     TYPEDESC tdescAlias;        /* if typekind == TKIND_ALIAS this field
  459.                                    specifies the type for which this type
  460.                                    is an alias */
  461.     IDLDESC idldescType;        /* IDL attributes of the described type */
  462. } TYPEATTR, * LPTYPEATTR;
  463.  
  464. typedef struct tagDISPPARAMS {
  465.     [size_is(cArgs)] VARIANTARG * rgvarg;
  466.     [size_is(cNamedArgs)] DISPID * rgdispidNamedArgs;
  467.     UINT cArgs;
  468.     UINT cNamedArgs;
  469. } DISPPARAMS;
  470.  
  471. cpp_quote("#if 0")
  472. cpp_quote("/* the following is what MIDL knows how to remote */")
  473.  
  474. typedef struct tagEXCEPINFO {
  475.     WORD  wCode;            /* An error code describing the error. */
  476.     WORD  wReserved;
  477.     BSTR  bstrSource;       /* A source of the exception */
  478.     BSTR  bstrDescription;  /* A description of the error */
  479.     BSTR  bstrHelpFile;     /* Fully qualified drive, path, and file name */
  480.     DWORD dwHelpContext;    /* help context of topic within the help file */
  481.     ULONG pvReserved;
  482.     ULONG pfnDeferredFillIn;
  483.     SCODE scode;
  484. } EXCEPINFO;
  485.  
  486. cpp_quote("#else /* 0 */")
  487. cpp_quote("typedef struct tagEXCEPINFO {")
  488. cpp_quote("    WORD  wCode;")
  489. cpp_quote("    WORD  wReserved;")
  490. cpp_quote("    BSTR  bstrSource;")
  491. cpp_quote("    BSTR  bstrDescription;")
  492. cpp_quote("    BSTR  bstrHelpFile;")
  493. cpp_quote("    DWORD dwHelpContext;")
  494. cpp_quote("    PVOID pvReserved;")
  495. cpp_quote("    HRESULT (__stdcall *pfnDeferredFillIn)(struct tagEXCEPINFO *);")
  496. cpp_quote("    SCODE scode;")
  497. cpp_quote("} EXCEPINFO, * LPEXCEPINFO;")
  498. cpp_quote("#endif /* 0 */")
  499.  
  500. typedef [v1_enum] enum tagCALLCONV {
  501.     CC_FASTCALL = 0,
  502.     CC_CDECL = 1,
  503.     CC_MSCPASCAL,
  504.     CC_PASCAL = CC_MSCPASCAL,
  505.     CC_MACPASCAL,
  506.     CC_STDCALL,
  507.     CC_FPFASTCALL,
  508.     CC_SYSCALL,
  509.     CC_MPWCDECL,
  510.     CC_MPWPASCAL,
  511.     CC_MAX          /* end of enum marker */
  512. } CALLCONV;
  513.  
  514. typedef [v1_enum] enum tagFUNCKIND {
  515.     FUNC_VIRTUAL,
  516.     FUNC_PUREVIRTUAL,
  517.     FUNC_NONVIRTUAL,
  518.     FUNC_STATIC,
  519.     FUNC_DISPATCH
  520. } FUNCKIND;
  521.  
  522. typedef [v1_enum] enum tagINVOKEKIND {
  523.     INVOKE_FUNC = 1,
  524.     INVOKE_PROPERTYGET = 2,
  525.     INVOKE_PROPERTYPUT = 4,
  526.     INVOKE_PROPERTYPUTREF = 8
  527. } INVOKEKIND;
  528.  
  529. typedef struct tagFUNCDESC {
  530.     MEMBERID memid;
  531.     [size_is(cScodes)] SCODE * lprgscode;
  532.     [size_is(cParams)] ELEMDESC * lprgelemdescParam; /* array of param types */
  533.     FUNCKIND funckind;
  534.     INVOKEKIND invkind;
  535.     CALLCONV callconv;
  536.     SHORT cParams;
  537.     SHORT cParamsOpt;
  538.     SHORT oVft;
  539.     SHORT cScodes;
  540.     ELEMDESC elemdescFunc;
  541.     WORD wFuncFlags;
  542. } FUNCDESC, * LPFUNCDESC;
  543.  
  544. typedef [v1_enum] enum tagVARKIND {
  545.     VAR_PERINSTANCE,
  546.     VAR_STATIC,
  547.     VAR_CONST,
  548.     VAR_DISPATCH
  549. } VARKIND;
  550.  
  551. /* IMPLTYPE Flags */
  552. const USHORT IMPLTYPEFLAG_FDEFAULT      = 0x1;
  553. const USHORT IMPLTYPEFLAG_FSOURCE       = 0x2;
  554. const USHORT IMPLTYPEFLAG_FRESTRICTED   = 0x4;
  555. const USHORT IMPLTYPEFLAG_FDEFAULTVTABLE= 0x8;
  556.  
  557. typedef struct tagVARDESC {
  558.     MEMBERID memid;
  559.     LPOLESTR lpstrSchema;
  560.     [switch_type(VARKIND), switch_is(varkind)] union {
  561.         /* offset of variable within the instance */
  562.         [case(VAR_PERINSTANCE, VAR_DISPATCH, VAR_STATIC)] ULONG oInst;
  563.         [case(VAR_CONST)] VARIANT * lpvarValue; /* the value of the constant */
  564.     };
  565.     ELEMDESC elemdescVar;
  566.     WORD     wVarFlags;
  567.     VARKIND  varkind;
  568. } VARDESC, * LPVARDESC;
  569.  
  570. typedef enum tagTYPEFLAGS {
  571.     TYPEFLAG_FAPPOBJECT = 0x01,
  572.     TYPEFLAG_FCANCREATE = 0x02,
  573.     TYPEFLAG_FLICENSED = 0x04,
  574.     TYPEFLAG_FPREDECLID = 0x08,
  575.     TYPEFLAG_FHIDDEN = 0x10,
  576.     TYPEFLAG_FCONTROL = 0x20,
  577.     TYPEFLAG_FDUAL = 0x40,
  578.     TYPEFLAG_FNONEXTENSIBLE = 0x80,
  579.     TYPEFLAG_FOLEAUTOMATION = 0x100,
  580.     TYPEFLAG_FRESTRICTED = 0x200,
  581.     TYPEFLAG_FAGGREGATABLE = 0x400,
  582.     TYPEFLAG_FREPLACEABLE = 0x800,
  583.     TYPEFLAG_FDISPATCHABLE = 0x1000,
  584.     TYPEFLAG_FREVERSEBIND = 0x2000
  585. } TYPEFLAGS;
  586.  
  587. typedef enum tagFUNCFLAGS {
  588.     FUNCFLAG_FRESTRICTED = 0x1,
  589.     FUNCFLAG_FSOURCE = 0x2,
  590.     FUNCFLAG_FBINDABLE = 0x4,
  591.     FUNCFLAG_FREQUESTEDIT = 0x8,
  592.     FUNCFLAG_FDISPLAYBIND = 0x10,
  593.     FUNCFLAG_FDEFAULTBIND = 0x20,
  594.     FUNCFLAG_FHIDDEN = 0x40,
  595.     FUNCFLAG_FUSESGETLASTERROR = 0x80,
  596.     FUNCFLAG_FDEFAULTCOLLELEM = 0x100,
  597.     FUNCFLAG_FUIDEFAULT = 0x200,
  598.     FUNCFLAG_FNONBROWSABLE = 0x400,
  599.     FUNCFLAG_FREPLACEABLE = 0x800,
  600.     FUNCFLAG_FIMMEDIATEBIND = 0x1000
  601. } FUNCFLAGS;
  602.  
  603. typedef enum tagVARFLAGS {
  604.     VARFLAG_FREADONLY = 0x1,
  605.     VARFLAG_FSOURCE = 0x2,
  606.     VARFLAG_FBINDABLE = 0x4,
  607.     VARFLAG_FREQUESTEDIT = 0x8,
  608.     VARFLAG_FDISPLAYBIND = 0x10,
  609.     VARFLAG_FDEFAULTBIND = 0x20,
  610.     VARFLAG_FHIDDEN = 0x40,
  611.     VARFLAG_FRESTRICTED = 0x80,
  612.     VARFLAG_FDEFAULTCOLLELEM = 0x100,
  613.     VARFLAG_FUIDEFAULT = 0x200,
  614.     VARFLAG_FNONBROWSABLE = 0x400,
  615.     VARFLAG_FREPLACEABLE = 0x800,
  616.     VARFLAG_FIMMEDIATEBIND = 0x1000
  617. } VARFLAGS;
  618.  
  619. typedef [wire_marshal(DWORD)] struct tagCLEANLOCALSTORAGE {
  620.     IUnknown * pInterface;      /* interface that is responsible for storage */
  621.     PVOID pStorage;             /* the storage being managed by interface */
  622.     DWORD flags;                /* which interface, what storage */
  623. } CLEANLOCALSTORAGE;
  624.  
  625. typedef struct tagCUSTDATAITEM {
  626.     GUID guid;           /* guid identifying this custom data item */
  627.     VARIANTARG varValue; /* value of this custom data item */
  628. } CUSTDATAITEM, * LPCUSTDATAITEM;
  629.  
  630. typedef struct tagCUSTDATA {
  631.     DWORD cCustData;            /* number of custom data items in rgCustData */
  632.     [size_is(cCustData)] LPCUSTDATAITEM prgCustData;
  633.                                 /* array of custom data items */
  634. } CUSTDATA, * LPCUSTDATA;
  635.  
  636. }
  637.  
  638.  
  639. [
  640.     object,
  641.     uuid(00020405-0000-0000-C000-000000000046),
  642.     pointer_default(unique),
  643.     local
  644. ]
  645.  
  646. interface ICreateTypeInfo: IUnknown
  647. {
  648.     typedef [unique] ICreateTypeInfo * LPCREATETYPEINFO;
  649.  
  650.     HRESULT SetGuid(
  651.                 [in] REFGUID guid
  652.             );
  653.  
  654.     HRESULT SetTypeFlags(
  655.                 [in] UINT uTypeFlags
  656.             );
  657.  
  658.     HRESULT SetDocString(
  659.                 [in] LPOLESTR pStrDoc
  660.             );
  661.  
  662.     HRESULT SetHelpContext(
  663.                 [in] DWORD dwHelpContext
  664.             );
  665.  
  666.     HRESULT SetVersion(
  667.                 [in] WORD wMajorVerNum,
  668.                 [in] WORD wMinorVerNum
  669.             );
  670.  
  671.     HRESULT AddRefTypeInfo(
  672.  
  673.                 [in] ITypeInfo * pTInfo,
  674.                 [in] HREFTYPE * phRefType
  675.             );
  676.  
  677.     HRESULT AddFuncDesc(
  678.                 [in] UINT index,
  679.                 [in] FUNCDESC * pFuncDesc
  680.             );
  681.  
  682.     HRESULT AddImplType(
  683.                 [in] UINT index,
  684.                 [in] HREFTYPE hRefType
  685.             );
  686.  
  687.     HRESULT SetImplTypeFlags(
  688.                 [in] UINT index,
  689.                 [in] INT implTypeFlags
  690.             );
  691.  
  692.     HRESULT SetAlignment(
  693.                 [in] WORD cbAlignment
  694.             );
  695.  
  696.     HRESULT SetSchema(
  697.                 [in] LPOLESTR pStrSchema
  698.             );
  699.  
  700.     HRESULT AddVarDesc(
  701.                 [in] UINT index,
  702.                 [in] VARDESC * pVarDesc
  703.             );
  704.  
  705.     HRESULT SetFuncAndParamNames(
  706.                 [in] UINT index,
  707.                 [in, size_is((UINT) cNames)]
  708.                 [in] LPOLESTR * rgszNames,
  709.                 [in] UINT cNames
  710.             );
  711.  
  712.     HRESULT SetVarName(
  713.                 [in] UINT index,
  714.                 [in] LPOLESTR szName
  715.             );
  716.  
  717.     HRESULT SetTypeDescAlias(
  718.                 [in] TYPEDESC * pTDescAlias
  719.             );
  720.  
  721.     HRESULT DefineFuncAsDllEntry(
  722.                 [in] UINT index,
  723.                 [in] LPOLESTR szDllName,
  724.                 [in] LPOLESTR szProcName
  725.             );
  726.  
  727.     HRESULT SetFuncDocString(
  728.                 [in] UINT index,
  729.                 [in] LPOLESTR szDocString
  730.             );
  731.  
  732.     HRESULT SetVarDocString(
  733.                 [in] UINT index,
  734.                 [in] LPOLESTR szDocString
  735.             );
  736.  
  737.     HRESULT SetFuncHelpContext(
  738.                 [in] UINT index,
  739.                 [in] DWORD dwHelpContext
  740.             );
  741.  
  742.     HRESULT SetVarHelpContext(
  743.                 [in] UINT index,
  744.                 [in] DWORD dwHelpContext
  745.             );
  746.  
  747.     HRESULT SetMops(
  748.                 [in] UINT index,
  749.                 [in] BSTR bstrMops
  750.             );
  751.  
  752.     HRESULT SetTypeIdldesc(
  753.                 [in] IDLDESC * pIdlDesc
  754.             );
  755.  
  756.     HRESULT LayOut(
  757.                 void
  758.             );
  759.  
  760. }
  761.  
  762.  
  763. [
  764.     object,
  765.     uuid(0002040E-0000-0000-C000-000000000046),
  766.     pointer_default(unique),
  767.     local
  768. ]
  769.  
  770. interface ICreateTypeInfo2: ICreateTypeInfo
  771. {
  772.     typedef [unique] ICreateTypeInfo2 * LPCREATETYPEINFO2;
  773.  
  774.     HRESULT DeleteFuncDesc(
  775.                 [in] UINT index
  776.             );
  777.  
  778.     HRESULT DeleteFuncDescByMemId(
  779.                 [in] MEMBERID memid,
  780.                 [in] INVOKEKIND invKind
  781.             );
  782.  
  783.     HRESULT DeleteVarDesc(
  784.                 [in] UINT index
  785.             );
  786.  
  787.     HRESULT DeleteVarDescByMemId(
  788.                 [in] MEMBERID memid
  789.             );
  790.  
  791.     HRESULT DeleteImplType(
  792.                 [in] UINT index
  793.             );
  794.  
  795.     HRESULT SetCustData(
  796.                 [in] REFGUID guid,
  797.                 [in] VARIANT * pVarVal
  798.             );
  799.  
  800.     HRESULT SetFuncCustData( 
  801.                 [in] UINT index, 
  802.                 [in] REFGUID guid, 
  803.                 [in] VARIANT * pVarVal
  804.             );
  805.     
  806.     HRESULT SetParamCustData( 
  807.                 [in] UINT indexFunc, 
  808.                 [in] UINT indexParam, 
  809.                 [in] REFGUID guid, 
  810.                 [in] VARIANT * pVarVal
  811.             );
  812.  
  813.     HRESULT SetVarCustData( 
  814.                 [in] UINT index, 
  815.                 [in] REFGUID guid, 
  816.                 [in] VARIANT * pVarVal
  817.             );
  818.  
  819.     HRESULT SetImplTypeCustData( 
  820.                 [in] UINT index, 
  821.                 [in] REFGUID guid, 
  822.                 [in] VARIANT * pVarVal
  823.             );
  824.  
  825.     HRESULT SetHelpStringContext(
  826.                 [in] ULONG dwHelpStringContext
  827.             );
  828.  
  829.     HRESULT SetFuncHelpStringContext(
  830.                 [in] UINT index,
  831.                 [in] ULONG dwHelpStringContext
  832.             );
  833.  
  834.     HRESULT SetVarHelpStringContext(
  835.                 [in] UINT index,
  836.                 [in] ULONG dwHelpStringContext
  837.             );
  838.  
  839.     HRESULT Invalidate(
  840.                 void
  841.             );
  842.  
  843.     HRESULT SetName(
  844.                 [in]  LPOLESTR szName
  845.             );
  846.  
  847. }
  848.  
  849.  
  850. [
  851.     object,
  852.     uuid(00020406-0000-0000-C000-000000000046),
  853.     pointer_default(unique),
  854.     local
  855. ]
  856.  
  857. interface ICreateTypeLib : IUnknown
  858. {
  859.     typedef [unique] ICreateTypeLib * LPCREATETYPELIB;
  860.  
  861.     HRESULT CreateTypeInfo(
  862.                 [in]  LPOLESTR szName,
  863.                 [in]  TYPEKIND tkind,
  864.                 [out] ICreateTypeInfo ** ppCTInfo
  865.             );
  866.  
  867.     HRESULT SetName(
  868.                 [in]  LPOLESTR szName
  869.             );
  870.  
  871.     HRESULT SetVersion(
  872.                 [in] WORD wMajorVerNum,
  873.                 [in] WORD wMinorVerNum
  874.             );
  875.  
  876.     HRESULT SetGuid(
  877.                 [in] REFGUID guid
  878.             );
  879.  
  880.     HRESULT SetDocString(
  881.                 [in] LPOLESTR szDoc
  882.             );
  883.  
  884.     HRESULT SetHelpFileName(
  885.                 [in] LPOLESTR szHelpFileName
  886.             );
  887.  
  888.     HRESULT SetHelpContext(
  889.                 [in] DWORD dwHelpContext
  890.             );
  891.  
  892.     HRESULT SetLcid(
  893.                 [in] LCID lcid
  894.             );
  895.  
  896.     HRESULT SetLibFlags(
  897.                 [in] UINT uLibFlags
  898.             );
  899.  
  900.     HRESULT SaveAllChanges(
  901.                 void
  902.             );
  903. }
  904.  
  905.  
  906. [
  907.     object,
  908.     uuid(0002040F-0000-0000-C000-000000000046),
  909.     pointer_default(unique),
  910.     local
  911. ]
  912.  
  913. interface ICreateTypeLib2 : ICreateTypeLib
  914. {
  915.     typedef [unique] ICreateTypeLib2 * LPCREATETYPELIB2;
  916.  
  917.     HRESULT DeleteTypeInfo(
  918.                 [in] LPOLESTR szName
  919.             );
  920.  
  921.     HRESULT SetCustData(
  922.                 [in] REFGUID guid,
  923.                 [in] VARIANT * pVarVal
  924.             );
  925.  
  926.     HRESULT SetHelpStringContext(
  927.                 [in] ULONG dwHelpStringContext
  928.             );
  929.  
  930.     HRESULT SetHelpStringDll(
  931.                 [in] LPOLESTR szFileName
  932.             );
  933. }
  934.  
  935.  
  936. [
  937.     object,
  938.     uuid(00020400-0000-0000-C000-000000000046),
  939.     pointer_default(unique)
  940. ]
  941.  
  942. interface IDispatch : IUnknown
  943. {
  944.     typedef [unique] IDispatch * LPDISPATCH;
  945.  
  946.     HRESULT GetTypeInfoCount(
  947.                 [out] UINT * pctinfo
  948.             );
  949.  
  950.     HRESULT GetTypeInfo(
  951.                 [in] UINT iTInfo,
  952.                 [in] LCID lcid,
  953.                 [out] ITypeInfo ** ppTInfo
  954.             );
  955.  
  956.     HRESULT GetIDsOfNames(
  957.                 [in] REFIID riid,
  958.                 [in, size_is(cNames)] LPOLESTR * rgszNames,
  959.                 [in] UINT cNames,
  960.                 [in] LCID lcid,
  961.                 [out, size_is(cNames)] DISPID * rgDispId
  962.             );
  963.  
  964.     [local]
  965.     HRESULT Invoke(
  966.                 [in] DISPID dispIdMember,
  967.                 [in] REFIID riid,
  968.                 [in] LCID lcid,
  969.                 [in] WORD wFlags,
  970.                 [in, out] DISPPARAMS * pDispParams,
  971.                 [out] VARIANT * pVarResult,
  972.                 [out] EXCEPINFO * pExcepInfo,
  973.                 [out] UINT * puArgErr
  974.             );
  975.  
  976.     [call_as(Invoke)]
  977.     HRESULT RemoteInvoke(
  978.                 [in] DISPID dispIdMember,
  979.                 [in] REFIID riid,
  980.                 [in] LCID lcid,
  981.                 [in] DWORD dwFlags,
  982.                 [in] DISPPARAMS * pDispParams,
  983.                 [out] VARIANT * pVarResult,
  984.                 [out] EXCEPINFO * pExcepInfo,
  985.                 [out] UINT * pArgErr,
  986.                 [in] UINT cVarRef,
  987.                 [in, size_is(cVarRef)] UINT * rgVarRefIdx, 
  988.                 [in, out, size_is(cVarRef)] VARIANTARG * rgVarRef
  989.             );
  990.  
  991. cpp_quote("/* DISPID reserved to indicate an \"unknown\" name */")
  992. cpp_quote("/* only reserved for data members (properties); reused as a method dispid below */")
  993. const DISPID DISPID_UNKNOWN = -1;
  994.  
  995. cpp_quote("/* DISPID reserved for the \"value\" property */")
  996. const DISPID DISPID_VALUE = 0;
  997.  
  998. cpp_quote("/* The following DISPID is reserved to indicate the param")
  999. cpp_quote(" * that is the right-hand-side (or \"put\" value) of a PropertyPut")
  1000. cpp_quote(" */")
  1001. const DISPID DISPID_PROPERTYPUT = -3;
  1002.  
  1003. cpp_quote("/* DISPID reserved for the standard \"NewEnum\" method */")
  1004. const DISPID DISPID_NEWENUM = -4;
  1005.  
  1006. cpp_quote("/* DISPID reserved for the standard \"Evaluate\" method */")
  1007. const DISPID DISPID_EVALUATE = -5;
  1008.  
  1009. const DISPID DISPID_CONSTRUCTOR = -6;
  1010.  
  1011. const DISPID DISPID_DESTRUCTOR = -7;
  1012.  
  1013. const DISPID DISPID_COLLECT = -8;
  1014.  
  1015. cpp_quote("/* The range -500 through -999 is reserved for Controls */")
  1016. cpp_quote("/* The range 0x80010000 through 0x8001FFFF is reserved for Controls */")
  1017. cpp_quote("/* The range -5000 through -5499 is reserved for ActiveX Accessability */")
  1018. cpp_quote("/* The remainder of the negative DISPIDs are reserved for future use */")
  1019.  
  1020. }
  1021.  
  1022.  
  1023. [
  1024.     object,
  1025.     uuid(00020404-0000-0000-C000-000000000046),
  1026.     pointer_default(unique)
  1027. ]
  1028.  
  1029. interface IEnumVARIANT : IUnknown
  1030. {
  1031.     typedef [unique] IEnumVARIANT* LPENUMVARIANT;
  1032.  
  1033.     [local]
  1034.     HRESULT Next(
  1035.                 [in] ULONG celt,
  1036.                 [out, size_is(celt), length_is(*pCeltFetched)] VARIANT * rgVar,
  1037.                 [out] ULONG * pCeltFetched
  1038.             );
  1039.  
  1040.     [call_as(Next)]
  1041.     HRESULT RemoteNext(
  1042.                 [in] ULONG celt,
  1043.                 [out, size_is(celt), length_is(*pCeltFetched)] VARIANT * rgVar,
  1044.                 [out] ULONG * pCeltFetched
  1045.             );
  1046.  
  1047.     HRESULT Skip(
  1048.                 [in] ULONG celt
  1049.             );
  1050.  
  1051.     HRESULT Reset(
  1052.             );
  1053.  
  1054.     HRESULT Clone(
  1055.                 [out] IEnumVARIANT ** ppEnum
  1056.             );
  1057. }
  1058.  
  1059.  
  1060. [
  1061.     object,
  1062.     uuid(00020403-0000-0000-C000-000000000046),
  1063.     pointer_default(unique)
  1064. ]
  1065.  
  1066. interface ITypeComp : IUnknown
  1067. {
  1068.     typedef [unique] ITypeComp * LPTYPECOMP;
  1069.  
  1070.     typedef [v1_enum] enum tagDESCKIND {
  1071.         DESCKIND_NONE = 0,
  1072.         DESCKIND_FUNCDESC,
  1073.         DESCKIND_VARDESC,
  1074.         DESCKIND_TYPECOMP,
  1075.         DESCKIND_IMPLICITAPPOBJ,
  1076.         DESCKIND_MAX
  1077.     } DESCKIND;
  1078.  
  1079.     typedef union tagBINDPTR {
  1080.         FUNCDESC  * lpfuncdesc;
  1081.         VARDESC   * lpvardesc;
  1082.         ITypeComp * lptcomp;
  1083.     } BINDPTR, * LPBINDPTR;
  1084.  
  1085.     [local]
  1086.     HRESULT Bind(
  1087.                 [in] LPOLESTR szName,
  1088.                 [in] ULONG lHashVal,
  1089.                 [in] WORD wFlags,
  1090.                 [out] ITypeInfo ** ppTInfo,
  1091.                 [out] DESCKIND * pDescKind,
  1092.                 [out] BINDPTR * pBindPtr
  1093.             );
  1094.  
  1095.     [call_as(Bind)]
  1096.     HRESULT RemoteBind(
  1097.                 [in] LPOLESTR szName,
  1098.                 [in] ULONG lHashVal,
  1099.                 [in] WORD wFlags,
  1100.                 [out] ITypeInfo ** ppTInfo,
  1101.                 [out] DESCKIND * pDescKind,
  1102.                 [out] LPFUNCDESC * ppFuncDesc,
  1103.                 [out] LPVARDESC * ppVarDesc,
  1104.                 [out] ITypeComp ** ppTypeComp,
  1105.                 [out] CLEANLOCALSTORAGE * pDummy
  1106.             );
  1107.  
  1108.     [local]
  1109.     HRESULT BindType(
  1110.                 [in] LPOLESTR szName,
  1111.                 [in] ULONG lHashVal,
  1112.                 [out] ITypeInfo ** ppTInfo,
  1113.                 [out] ITypeComp ** ppTComp
  1114.             );
  1115.  
  1116.     [call_as(BindType)]
  1117.     HRESULT RemoteBindType(
  1118.                 [in] LPOLESTR szName,
  1119.                 [in] ULONG lHashVal,
  1120.                 [out] ITypeInfo ** ppTInfo
  1121.             );
  1122. }
  1123.  
  1124.  
  1125. [
  1126.     object,
  1127.     uuid(00020401-0000-0000-C000-000000000046),
  1128.     pointer_default(unique)
  1129. ]
  1130.  
  1131. interface ITypeInfo : IUnknown
  1132. {
  1133.     typedef [unique] ITypeInfo * LPTYPEINFO;
  1134.  
  1135.     [local]
  1136.     HRESULT GetTypeAttr(
  1137.                 [out] TYPEATTR ** ppTypeAttr
  1138.             );
  1139.  
  1140.     [call_as(GetTypeAttr)]
  1141.     HRESULT RemoteGetTypeAttr(
  1142.                 [out] LPTYPEATTR * ppTypeAttr,
  1143.                 [out] CLEANLOCALSTORAGE * pDummy
  1144.             );
  1145.  
  1146.     HRESULT GetTypeComp(
  1147.                 [out] ITypeComp ** ppTComp
  1148.             );
  1149.  
  1150.     [local]
  1151.     HRESULT GetFuncDesc(
  1152.                 [in] UINT index,
  1153.                 [out] FUNCDESC ** ppFuncDesc
  1154.             );
  1155.  
  1156.     [call_as(GetFuncDesc)]
  1157.     HRESULT RemoteGetFuncDesc(
  1158.                 [in] UINT index,
  1159.                 [out] LPFUNCDESC * ppFuncDesc,
  1160.                 [out] CLEANLOCALSTORAGE * pDummy
  1161.             );
  1162.  
  1163.     [local]
  1164.     HRESULT GetVarDesc(
  1165.                 [in] UINT index,
  1166.                 [out] VARDESC ** ppVarDesc
  1167.             );
  1168.  
  1169.     [call_as(GetVarDesc)]
  1170.     HRESULT RemoteGetVarDesc(
  1171.                 [in] UINT index,
  1172.                 [out] LPVARDESC * ppVarDesc,
  1173.                 [out] CLEANLOCALSTORAGE * pDummy
  1174.             );
  1175.  
  1176.     [local]
  1177.     HRESULT GetNames(
  1178.                 [in] MEMBERID memid,
  1179.                 [out,size_is(cMaxNames),length_is(*pcNames)] BSTR * rgBstrNames,
  1180.                 [in] UINT cMaxNames,
  1181.                 [out] UINT * pcNames
  1182.             );
  1183.  
  1184.     [call_as(GetNames)]
  1185.     HRESULT RemoteGetNames(
  1186.                 [in] MEMBERID memid,
  1187.                 [out,size_is(cMaxNames),length_is(*pcNames)] BSTR * rgBstrNames,
  1188.                 [in] UINT cMaxNames,
  1189.                 [out] UINT * pcNames
  1190.             );
  1191.  
  1192.     HRESULT GetRefTypeOfImplType(
  1193.                 [in] UINT index,
  1194.                 [out] HREFTYPE * pRefType
  1195.             );
  1196.  
  1197.     HRESULT GetImplTypeFlags(
  1198.                 [in] UINT index,
  1199.                 [out] INT * pImplTypeFlags
  1200.             );
  1201.  
  1202.     HRESULT GetIDsOfNames(
  1203.                 [in, size_is(cNames)] LPOLESTR * rgszNames,
  1204.                 [in] UINT cNames,
  1205.                 [out, size_is(cNames)] MEMBERID * pMemId
  1206.             );
  1207.  
  1208.     [local]
  1209.     HRESULT Invoke(
  1210.                 [in] PVOID pvInstance,
  1211.                 [in] MEMBERID memid,
  1212.                 [in] WORD wFlags,
  1213.                 [in, out] DISPPARAMS * pDispParams,
  1214.                 [out] VARIANT * pVarResult,
  1215.                 [out] EXCEPINFO * pExcepInfo,
  1216.                 [out] UINT * puArgErr
  1217.             );
  1218.  
  1219.     [call_as(Invoke)]
  1220.     HRESULT RemoteInvoke (
  1221.                 [in] IUnknown * pIUnk,
  1222.                 [in] MEMBERID memid,
  1223.                 [in] DWORD dwFlags,
  1224.                 [in] DISPPARAMS * pDispParams,
  1225.                 [out] VARIANT * pVarResult,
  1226.                 [out] EXCEPINFO * pExcepInfo,
  1227.                 [out] UINT * pArgErr,
  1228.                 [in] UINT cVarRef,
  1229.                 [in, size_is(cVarRef)] UINT * rgVarRefIdx,
  1230.                 [in, out, size_is(cVarRef)] VARIANTARG * rgVarRef
  1231.             );
  1232.  
  1233.     [local]
  1234.     HRESULT GetDocumentation(
  1235.                 [in] MEMBERID memid,
  1236.                 [out] BSTR * pBstrName,
  1237.                 [out] BSTR * pBstrDocString,
  1238.                 [out] DWORD * pdwHelpContext,
  1239.                 [out] BSTR * pBstrHelpFile
  1240.             );
  1241.  
  1242.     [call_as(GetDocumentation)]
  1243.     HRESULT RemoteGetDocumentation(
  1244.                 [in] MEMBERID memid,
  1245.                 [in] DWORD refPtrFlags,
  1246.                 [out] BSTR * pBstrName,
  1247.                 [out] BSTR * pBstrDocString,
  1248.                 [out] DWORD * pdwHelpContext,
  1249.                 [out] BSTR * pBstrHelpFile
  1250.             );
  1251.  
  1252.     [local]
  1253.     HRESULT GetDllEntry(
  1254.                 [in] MEMBERID memid,
  1255.                 [in] INVOKEKIND invKind,
  1256.                 [out] BSTR * pBstrDllName,
  1257.                 [out] BSTR * pBstrName,
  1258.                 [out] WORD * pwOrdinal
  1259.             );
  1260.  
  1261.     [call_as(GetDllEntry)]
  1262.     HRESULT RemoteGetDllEntry(
  1263.                 [in] MEMBERID memid,
  1264.                 [in] INVOKEKIND invKind,
  1265.                 [in] DWORD refPtrFlags,
  1266.                 [out] BSTR * pBstrDllName,
  1267.                 [out] BSTR * pBstrName,
  1268.                 [out] WORD * pwOrdinal
  1269.             );
  1270.  
  1271.     HRESULT GetRefTypeInfo(
  1272.                 [in] HREFTYPE hRefType,
  1273.                 [out] ITypeInfo ** ppTInfo
  1274.             );
  1275.  
  1276.     [local]
  1277.     HRESULT AddressOfMember(
  1278.                 [in] MEMBERID memid,
  1279.                 [in] INVOKEKIND invKind,
  1280.                 [out] PVOID * ppv
  1281.             );
  1282.  
  1283.     [call_as(AddressOfMember)]
  1284.     HRESULT LocalAddressOfMember(
  1285.                 void
  1286.             );
  1287.  
  1288.     [local]
  1289.     HRESULT CreateInstance(
  1290.                 [in] IUnknown * pUnkOuter,
  1291.                 [in] REFIID riid,
  1292.                 [out, iid_is(riid)] PVOID * ppvObj
  1293.             );
  1294.  
  1295.     [call_as(CreateInstance)]
  1296.     HRESULT RemoteCreateInstance(
  1297.                 [in] REFIID riid,
  1298.                 [out, iid_is(riid)] IUnknown ** ppvObj
  1299.             );
  1300.  
  1301.     HRESULT GetMops(
  1302.                 [in] MEMBERID memid,
  1303.                 [out] BSTR * pBstrMops
  1304.             );
  1305.  
  1306.     [local]
  1307.     HRESULT GetContainingTypeLib(
  1308.                 [out] ITypeLib ** ppTLib,
  1309.                 [out] UINT * pIndex
  1310.             );
  1311.  
  1312.     [call_as(GetContainingTypeLib)]
  1313.     HRESULT RemoteGetContainingTypeLib(
  1314.                 [out] ITypeLib ** ppTLib,
  1315.                 [out] UINT * pIndex
  1316.             );
  1317.  
  1318.     [local]
  1319.     void ReleaseTypeAttr(
  1320.                 [in] TYPEATTR * pTypeAttr
  1321.             );
  1322.  
  1323.     [call_as(ReleaseTypeAttr)]
  1324.     HRESULT LocalReleaseTypeAttr(
  1325.                 void
  1326.             );
  1327.  
  1328.     [local]
  1329.     void ReleaseFuncDesc(
  1330.                 [in] FUNCDESC * pFuncDesc
  1331.             );
  1332.  
  1333.     [call_as(ReleaseFuncDesc)]
  1334.     HRESULT LocalReleaseFuncDesc(
  1335.                 void
  1336.             );
  1337.  
  1338.     [local]
  1339.     void ReleaseVarDesc(
  1340.                 [in] VARDESC * pVarDesc
  1341.             );
  1342.  
  1343.     [call_as(ReleaseVarDesc)]
  1344.     HRESULT LocalReleaseVarDesc(
  1345.                 void
  1346.             );
  1347. }
  1348.  
  1349.  
  1350.  
  1351. [
  1352.     object,
  1353.     uuid(00020412-0000-0000-C000-000000000046),
  1354.     pointer_default(unique)
  1355. ]
  1356.  
  1357. interface ITypeInfo2 : ITypeInfo
  1358. {
  1359.     typedef [unique] ITypeInfo2 * LPTYPEINFO2;
  1360.  
  1361.     HRESULT GetTypeKind(
  1362.                 [out] TYPEKIND * pTypeKind
  1363.             );
  1364.  
  1365.     HRESULT GetTypeFlags(
  1366.                 [out] ULONG * pTypeFlags
  1367.             );
  1368.  
  1369.     HRESULT GetFuncIndexOfMemId(
  1370.                 [in] MEMBERID memid, 
  1371.                 [in] INVOKEKIND invKind, 
  1372.                 [out] UINT * pFuncIndex
  1373.             );
  1374.  
  1375.     HRESULT GetVarIndexOfMemId(
  1376.                 [in] MEMBERID memid, 
  1377.                 [out] UINT * pVarIndex
  1378.             );
  1379.  
  1380.     HRESULT GetCustData(
  1381.                 [in] REFGUID guid,
  1382.                 [out] VARIANT * pVarVal
  1383.             );
  1384.     
  1385.     HRESULT GetFuncCustData(
  1386.                 [in] UINT index, 
  1387.                 [in] REFGUID guid, 
  1388.                 [out] VARIANT * pVarVal
  1389.             );
  1390.     
  1391.     HRESULT GetParamCustData(
  1392.                 [in] UINT indexFunc, 
  1393.                 [in] UINT indexParam, 
  1394.                 [in] REFGUID guid, 
  1395.                 [out] VARIANT * pVarVal
  1396.             );
  1397.  
  1398.     HRESULT GetVarCustData(
  1399.                 [in] UINT index, 
  1400.                 [in] REFGUID guid, 
  1401.                 [out] VARIANT * pVarVal
  1402.             );
  1403.  
  1404.     HRESULT GetImplTypeCustData(
  1405.                 [in] UINT index, 
  1406.                 [in] REFGUID guid, 
  1407.                 [out] VARIANT * pVarVal
  1408.             );
  1409.  
  1410.     [local]
  1411.     HRESULT GetDocumentation2(
  1412.                 [in] MEMBERID memid,
  1413.                 [in] LCID lcid,
  1414.                 [out] BSTR *pbstrHelpString,
  1415.                 [out] DWORD *pdwHelpStringContext,
  1416.                 [out] BSTR *pbstrHelpStringDll
  1417.             );
  1418.  
  1419.     [call_as(GetDocumentation2)]
  1420.     HRESULT RemoteGetDocumentation2(
  1421.                 [in] MEMBERID memid,
  1422.                 [in] LCID lcid,
  1423.                 [in] DWORD refPtrFlags,
  1424.                 [out] BSTR *pbstrHelpString,
  1425.                 [out] DWORD *pdwHelpStringContext,
  1426.                 [out] BSTR *pbstrHelpStringDll
  1427.             );
  1428.  
  1429.     HRESULT GetAllCustData(
  1430.                 [out] CUSTDATA * pCustData
  1431.             );
  1432.     
  1433.     HRESULT GetAllFuncCustData(
  1434.                 [in] UINT index, 
  1435.                 [out] CUSTDATA * pCustData
  1436.             );
  1437.     
  1438.     HRESULT GetAllParamCustData(
  1439.                 [in] UINT indexFunc, 
  1440.                 [in] UINT indexParam, 
  1441.                 [out] CUSTDATA * pCustData
  1442.             );
  1443.  
  1444.     HRESULT GetAllVarCustData(
  1445.                 [in] UINT index, 
  1446.                 [out] CUSTDATA * pCustData
  1447.             );
  1448.  
  1449.     HRESULT GetAllImplTypeCustData(
  1450.                 [in] UINT index, 
  1451.                 [out] CUSTDATA * pCustData
  1452.             );
  1453. }
  1454.  
  1455.  
  1456. [
  1457.     object,
  1458.     uuid(00020402-0000-0000-C000-000000000046),
  1459.     pointer_default(unique)
  1460. ]
  1461.  
  1462. interface ITypeLib : IUnknown
  1463. {
  1464.     typedef [v1_enum] enum tagSYSKIND {
  1465.         SYS_WIN16 = 0,
  1466.         SYS_WIN32,
  1467.         SYS_MAC
  1468.     } SYSKIND;
  1469.  
  1470.     typedef [v1_enum] enum tagLIBFLAGS {
  1471.         LIBFLAG_FRESTRICTED = 0x01,
  1472.         LIBFLAG_FCONTROL = 0x02,
  1473.         LIBFLAG_FHIDDEN = 0x04,
  1474.         LIBFLAG_FHASDISKIMAGE = 0x08
  1475.     } LIBFLAGS;
  1476.  
  1477.     typedef [unique] ITypeLib * LPTYPELIB;
  1478.  
  1479.     typedef struct tagTLIBATTR {
  1480.         GUID guid;
  1481.         LCID lcid;
  1482.         SYSKIND syskind;
  1483.         WORD wMajorVerNum;
  1484.         WORD wMinorVerNum;
  1485.         WORD wLibFlags;
  1486.     } TLIBATTR, * LPTLIBATTR;
  1487.  
  1488.     [local]
  1489.     UINT GetTypeInfoCount(
  1490.                 void
  1491.             );
  1492.  
  1493.     [call_as(GetTypeInfoCount)]
  1494.     HRESULT RemoteGetTypeInfoCount(
  1495.                 [out]  UINT * pcTInfo
  1496.             );
  1497.  
  1498.     HRESULT GetTypeInfo(
  1499.                 [in]  UINT index,
  1500.                 [out] ITypeInfo ** ppTInfo
  1501.             );
  1502.  
  1503.     HRESULT GetTypeInfoType(
  1504.                 [in]  UINT index,
  1505.                 [out] TYPEKIND * pTKind
  1506.             );
  1507.  
  1508.     HRESULT GetTypeInfoOfGuid(
  1509.                 [in]  REFGUID guid,
  1510.                 [out] ITypeInfo ** ppTinfo
  1511.             );
  1512.  
  1513.     [local]
  1514.     HRESULT GetLibAttr(
  1515.                 [out] TLIBATTR ** ppTLibAttr
  1516.             );
  1517.  
  1518.     [call_as(GetLibAttr)]
  1519.     HRESULT RemoteGetLibAttr(
  1520.                 [out] LPTLIBATTR * ppTLibAttr,
  1521.                 [out] CLEANLOCALSTORAGE * pDummy
  1522.             );
  1523.  
  1524.     HRESULT GetTypeComp(
  1525.                 [out] ITypeComp ** ppTComp
  1526.             );
  1527.  
  1528.     [local]
  1529.     HRESULT GetDocumentation(
  1530.                 [in]  INT index,
  1531.                 [out] BSTR * pBstrName,
  1532.                 [out] BSTR * pBstrDocString,
  1533.                 [out] DWORD * pdwHelpContext,
  1534.                 [out] BSTR * pBstrHelpFile
  1535.             );
  1536.  
  1537.     [call_as(GetDocumentation)]
  1538.     HRESULT RemoteGetDocumentation(
  1539.                 [in]  INT index,
  1540.                 [in]  DWORD refPtrFlags,
  1541.                 [out] BSTR * pBstrName,
  1542.                 [out] BSTR * pBstrDocString,
  1543.                 [out] DWORD * pdwHelpContext,
  1544.                 [out] BSTR * pBstrHelpFile
  1545.             );
  1546.  
  1547.     [local]
  1548.     HRESULT IsName(
  1549.                 [in, out] LPOLESTR szNameBuf,
  1550.                 [in] ULONG lHashVal,
  1551.                 [out] BOOL * pfName
  1552.             );
  1553.  
  1554.     [call_as(IsName)]
  1555.     HRESULT RemoteIsName(
  1556.                 [in] LPOLESTR szNameBuf,
  1557.                 [in] ULONG lHashVal,
  1558.                 [out] BOOL * pfName,
  1559.                 [out] BSTR * pBstrLibName
  1560.             );
  1561.  
  1562.     [local]
  1563.     HRESULT FindName(
  1564.                 [in, out] LPOLESTR szNameBuf,
  1565.                 [in] ULONG lHashVal,
  1566.                 [out,size_is(*pcFound),length_is(*pcFound)] ITypeInfo **ppTInfo,
  1567.                 [out,size_is(*pcFound),length_is(*pcFound)] MEMBERID * rgMemId,
  1568.                 [in, out] USHORT * pcFound
  1569.             );
  1570.  
  1571.     [call_as(FindName)]
  1572.     HRESULT RemoteFindName(
  1573.                 [in] LPOLESTR szNameBuf,
  1574.                 [in] ULONG lHashVal,
  1575.                 [out,size_is(*pcFound),length_is(*pcFound)] ITypeInfo **ppTInfo,
  1576.                 [out,size_is(*pcFound),length_is(*pcFound)] MEMBERID * rgMemId,
  1577.                 [in, out] USHORT * pcFound,
  1578.                 [out] BSTR * pBstrLibName
  1579.             );
  1580.  
  1581.     [local]
  1582.     void ReleaseTLibAttr(
  1583.                 [in]  TLIBATTR * pTLibAttr
  1584.             );
  1585.  
  1586.     [call_as(ReleaseTLibAttr)]
  1587.     HRESULT LocalReleaseTLibAttr(
  1588.                 void
  1589.             );
  1590. }
  1591.  
  1592.  
  1593. [
  1594.     object,
  1595.     uuid(00020411-0000-0000-C000-000000000046),
  1596.     pointer_default(unique)
  1597. ]
  1598.  
  1599. interface ITypeLib2 : ITypeLib
  1600. {
  1601.     typedef [unique] ITypeLib2 * LPTYPELIB2;
  1602.  
  1603.     HRESULT GetCustData(
  1604.                 [in] REFGUID guid,
  1605.                 [out] VARIANT * pVarVal
  1606.             );
  1607.  
  1608.     [local]
  1609.     HRESULT GetLibStatistics(
  1610.                 [out] ULONG * pcUniqueNames,
  1611.                 [out] ULONG * pcchUniqueNames
  1612.             );
  1613.  
  1614.     [call_as(GetLibStatistics)]
  1615.     HRESULT RemoteGetLibStatistics(
  1616.                 [out] ULONG * pcUniqueNames,
  1617.                 [out] ULONG * pcchUniqueNames
  1618.             );
  1619.  
  1620.     [local]
  1621.     HRESULT GetDocumentation2(
  1622.                 [in]  INT index,
  1623.                 [in]  LCID lcid,
  1624.                 [out] BSTR *pbstrHelpString,
  1625.                 [out] DWORD *pdwHelpStringContext,
  1626.                 [out] BSTR *pbstrHelpStringDll
  1627.             );
  1628.  
  1629.     [call_as(GetDocumentation2)]
  1630.     HRESULT RemoteGetDocumentation2(
  1631.                 [in]  INT index,
  1632.                 [in]  LCID lcid,
  1633.                 [in]  DWORD refPtrFlags,
  1634.                 [out] BSTR *pbstrHelpString,
  1635.                 [out] DWORD *pdwHelpStringContext,
  1636.                 [out] BSTR *pbstrHelpStringDll
  1637.             );
  1638.  
  1639.  
  1640.     HRESULT GetAllCustData(
  1641.                 [out] CUSTDATA * pCustData
  1642.             );
  1643. }
  1644.  
  1645.  
  1646. [
  1647.     object,
  1648.     uuid(00020410-0000-0000-C000-000000000046),
  1649.     pointer_default(unique),
  1650.     local
  1651. ]
  1652.  
  1653. interface ITypeChangeEvents: IUnknown
  1654. {
  1655.     typedef [unique] ITypeChangeEvents * LPTYPECHANGEEVENTS;
  1656.  
  1657.     // notification messages used by the dynamic typeinfo protocol.
  1658.     typedef enum tagCHANGEKIND {
  1659.         CHANGEKIND_ADDMEMBER,
  1660.         CHANGEKIND_DELETEMEMBER,
  1661.         CHANGEKIND_SETNAMES,
  1662.         CHANGEKIND_SETDOCUMENTATION,
  1663.         CHANGEKIND_GENERAL,
  1664.         CHANGEKIND_INVALIDATE,
  1665.         CHANGEKIND_CHANGEFAILED,
  1666.         CHANGEKIND_MAX
  1667.     } CHANGEKIND;
  1668.  
  1669.     HRESULT RequestTypeChange(
  1670.                 [in] CHANGEKIND changeKind,
  1671.                 [in] ITypeInfo * pTInfoBefore,
  1672.                 [in] LPOLESTR pStrName,
  1673.                 [out] INT * pfCancel
  1674.             );
  1675.     
  1676.     HRESULT AfterTypeChange(
  1677.                 [in] CHANGEKIND changeKind,
  1678.                 [in] ITypeInfo * pTInfoAfter,
  1679.                 [in] LPOLESTR pStrName
  1680.             );
  1681. }
  1682.  
  1683.  
  1684. [
  1685.     object,
  1686.     uuid(1CF2B120-547D-101B-8E65-08002B2BD119),
  1687.     pointer_default(unique),
  1688.     local
  1689. ]
  1690.  
  1691. interface IErrorInfo: IUnknown
  1692. {
  1693.     typedef [unique] IErrorInfo * LPERRORINFO;
  1694.  
  1695.     HRESULT GetGUID(
  1696.                 [out] GUID * pGUID
  1697.             );
  1698.  
  1699.     HRESULT GetSource(
  1700.                 [out] BSTR * pBstrSource
  1701.             );
  1702.  
  1703.     HRESULT GetDescription(
  1704.                 [out] BSTR * pBstrDescription
  1705.             );
  1706.  
  1707.     HRESULT GetHelpFile(
  1708.                 [out] BSTR * pBstrHelpFile
  1709.             );
  1710.  
  1711.     HRESULT GetHelpContext(
  1712.                 [out] DWORD * pdwHelpContext
  1713.             );
  1714. }
  1715.  
  1716.  
  1717. [
  1718.     object,
  1719.     uuid(22F03340-547D-101B-8E65-08002B2BD119),
  1720.     pointer_default(unique),
  1721.     local
  1722. ]
  1723.  
  1724. interface ICreateErrorInfo: IUnknown
  1725. {
  1726.     typedef [unique] ICreateErrorInfo * LPCREATEERRORINFO;
  1727.  
  1728.     HRESULT SetGUID(
  1729.                 [in] REFGUID rguid
  1730.             );
  1731.  
  1732.     HRESULT SetSource(
  1733.                 [in] LPOLESTR szSource
  1734.             );
  1735.  
  1736.     HRESULT SetDescription(
  1737.                 [in] LPOLESTR szDescription
  1738.             );
  1739.  
  1740.     HRESULT SetHelpFile(
  1741.                 [in] LPOLESTR szHelpFile
  1742.             );
  1743.  
  1744.     HRESULT SetHelpContext(
  1745.                 [in] DWORD dwHelpContext
  1746.             );
  1747. }
  1748.  
  1749.  
  1750. [
  1751.     object,
  1752.     uuid(DF0B3D60-548F-101B-8E65-08002B2BD119),
  1753.     pointer_default(unique)
  1754. ]
  1755.  
  1756. interface ISupportErrorInfo: IUnknown
  1757. {
  1758.     typedef [unique] ISupportErrorInfo * LPSUPPORTERRORINFO;
  1759.  
  1760.     HRESULT InterfaceSupportsErrorInfo(
  1761.                 [in]  REFIID riid
  1762.             );
  1763. }
  1764.  
  1765.